<!DOCTYPE html>
<html lang="zh-cn">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport"
	content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta name="renderer" content="webkit">
<title></title>
<link rel="stylesheet" href="css/pintuer.css">
<link rel="stylesheet" href="css/admin.css">
<script src="js/jquery.js"></script>
<script src="js/pintuer.js"></script>
</head>
<body>
	<form method="post" action="" id="listform">
		<div class="panel admin-panel">
			<div class="panel-head">
				<strong class="icon-reorder"> 帖子列表</strong>
			</div>
			<div class="padding border-bottom">
				<ul class="search" style="padding-left:10px;">
					<li>搜索：</li>
					<li><input type="text" placeholder="请输入搜索关键字" name="keywords"
						class="input"
						style="width:250px; line-height:17px;display:inline-block" /> <a
						href="javascript:void(0)" class="button border-main icon-search"
						onclick="changesearch()"> 搜索</a></li>
				</ul>
			</div>
			<table class="table table-hover text-center">
				<tr>
					<th width="100" style="text-align:left; padding-left:20px;">ID</th>
					<th width="10%">作者</th>
					<th>标题</th>
					<th></th>
					<th>属性</th>
					<th>分类名称</th>
					<th width="10%">更新时间</th>
					<th width="310">操作</th>
				</tr>
				<volist name="list" id="vo">
				<tr>
					<td style="text-align:left; padding-left:20px;"><input
						type="checkbox" name="id[]" value="" /> 1</td>
					<td>涛崽</td>
					<td width="10%">论一个逗比的养成</td>
					<td></td>
					<td><font color="#00CC99">精贴</font></td>
					<td>美食天下</td>
					<td>2016-07-01</td>
					<td><div class="button-group">
							<a class="button border-main" href="showPost.html"><span
								class="icon-search-plus"></span> 查看</a><a class="button border-red"
								href="javascript:void(0)" onclick="return del(1)"><span
								class="icon-trash-o"></span> 删除</a>
						</div></td>
				</tr>

				<tr>
					<td style="text-align:left; padding:19px 0;padding-left:20px;"><input
						type="checkbox" id="checkall" /> 全选</td>
					<td colspan="7" style="text-align:left;padding-left:20px;"><a
						href="javascript:void(0)" class="button border-red icon-edit"
						style="padding:5px 15px;" onclick="DelSelect()"> 加精</a> <a
						href="javascript:void(0)" style="padding:5px 15px; margin:0 10px;"
						class="button border-blue icon-arrow-up" onclick="sorts()"> 置顶</a>
				</tr>
				<tr>
					<td colspan="8"><div class="pagelist">
							<a href="">上一页</a> <span class="current">1</span><a href="">2</a><a
								href="">3</a><a href="">下一页</a><a href="">尾页</a>
						</div></td>
				</tr>
			</table>
		</div>
	</form>
	<script type="text/javascript">
	
		//搜索
		function changesearch() {
		}
	
		function del(id) {
			if (confirm("您确定要删除吗?")) {
				alert("ok");
			}
		}
	
		//全选
		$("#checkall").click(function() {
			$("input[name='id[]']").each(function() {
				if (this.checked) {
					this.checked = false;
				} else {
					this.checked = true;
				}
			});
		})
	
		//加精
		function DelSelect() {
			var Checkbox = false;
			$("input[name='id[]']").each(function() {
				if (this.checked == true) {
					Checkbox = true;
				}
			});
			if (Checkbox) {
				var t = confirm("您确认要置顶选中的内容吗？");
				if (t == false) return false;
				$("#listform").submit();
			} else {
				alert("请选择您要删除的内容!");
				return false;
			}
		}
	
		//批量置顶
		function sorts() {
			var Checkbox = false;
			$("input[name='id[]']").each(function() {
				if (this.checked == true) {
					Checkbox = true;
				}
			});
			if (Checkbox) {
	
				$("#listform").submit();
			} else {
				alert("请选择要操作的内容!");
				return false;
			}
		}
	
	
		//批量首页显示
		function changeishome(o) {
			var Checkbox = false;
			$("input[name='id[]']").each(function() {
				if (this.checked == true) {
					Checkbox = true;
				}
			});
			if (Checkbox) {
	
				$("#listform").submit();
			} else {
				alert("请选择要操作的内容!");
	
				return false;
			}
		}
	
		//批量推荐
		function changeisvouch(o) {
			var Checkbox = false;
			$("input[name='id[]']").each(function() {
				if (this.checked == true) {
					Checkbox = true;
				}
			});
			if (Checkbox) {
	
	
				$("#listform").submit();
			} else {
				alert("请选择要操作的内容!");
	
				return false;
			}
		}
	
		//批量置顶
		function changeistop(o) {
			var Checkbox = false;
			$("input[name='id[]']").each(function() {
				if (this.checked == true) {
					Checkbox = true;
				}
			});
			if (Checkbox) {
	
				$("#listform").submit();
			} else {
				alert("请选择要操作的内容!");
	
				return false;
			}
		}
	
	
		//批量移动
		function changecate(o) {
			var Checkbox = false;
			$("input[name='id[]']").each(function() {
				if (this.checked == true) {
					Checkbox = true;
				}
			});
			if (Checkbox) {
	
				$("#listform").submit();
			} else {
				alert("请选择要操作的内容!");
	
				return false;
			}
		}
	
		//批量复制
		function changecopy(o) {
			var Checkbox = false;
			$("input[name='id[]']").each(function() {
				if (this.checked == true) {
					Checkbox = true;
				}
			});
			if (Checkbox) {
				var i = 0;
				$("input[name='id[]']").each(function() {
					if (this.checked == true) {
						i++;
					}
				});
				if (i > 1) {
					alert("只能选择一条信息!");
					$(o).find("option:first").prop("selected", "selected");
				} else {
	
					$("#listform").submit();
				}
			} else {
				alert("请选择要复制的内容!");
				$(o).find("option:first").prop("selected", "selected");
				return false;
			}
		}
	</script>
</body>
</html>